\(\int \frac {1}{(a+b x) (c+d x) (A+B \log (e (a+b x)^n (c+d x)^{-n}))^2} \, dx\) [232]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 40, antiderivative size = 43 \[ \int \frac {1}{(a+b x) (c+d x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2} \, dx=-\frac {1}{B (b c-a d) n \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )} \]

[Out]

-1/B/(-a*d+b*c)/n/(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))

Rubi [A] (verified)

Time = 0.15 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2573, 2561, 2339, 30} \[ \int \frac {1}{(a+b x) (c+d x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2} \, dx=-\frac {1}{B n (b c-a d) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )} \]

[In]

Int[1/((a + b*x)*(c + d*x)*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])^2),x]

[Out]

-(1/(B*(b*c - a*d)*n*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])))

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2561

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m
_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol] :> Dist[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q, Subst[Int[x^m*((A +
 B*Log[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, h, i,
A, B, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[b*f - a*g, 0] && EqQ[d*h - c*i, 0] && IntegersQ[m, q]

Rule 2573

Int[((A_.) + Log[(e_.)*(u_)^(n_.)*(v_)^(mn_)]*(B_.))^(p_.)*(w_.), x_Symbol] :> Subst[Int[w*(A + B*Log[e*(u/v)^
n])^p, x], e*(u/v)^n, e*(u^n/v^n)] /; FreeQ[{e, A, B, n, p}, x] && EqQ[n + mn, 0] && LinearQ[{u, v}, x] &&  !I
ntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1}{(a+b x) (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx,e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right ) \\ & = \text {Subst}\left (\frac {\text {Subst}\left (\int \frac {1}{x \left (A+B \log \left (e x^n\right )\right )^2} \, dx,x,\frac {a+b x}{c+d x}\right )}{b c-a d},e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right ) \\ & = \text {Subst}\left (\frac {\text {Subst}\left (\int \frac {1}{x^2} \, dx,x,A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B (b c-a d) n},e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right ) \\ & = -\frac {1}{B (b c-a d) n \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.95 \[ \int \frac {1}{(a+b x) (c+d x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2} \, dx=-\frac {1}{(b B c n-a B d n) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )} \]

[In]

Integrate[1/((a + b*x)*(c + d*x)*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])^2),x]

[Out]

-(1/((b*B*c*n - a*B*d*n)*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])))

Maple [A] (verified)

Time = 65.20 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00

method result size
derivativedivides \(\frac {1}{\left (A +B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )\right ) B n \left (a d -c b \right )}\) \(43\)
default \(\frac {1}{\left (A +B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )\right ) B n \left (a d -c b \right )}\) \(43\)
parallelrisch \(\frac {1}{\left (A +B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )\right ) B n \left (a d -c b \right )}\) \(43\)
risch \(\frac {2}{B n \left (a d -c b \right ) \left (2 A +2 B \ln \left (e \right )+2 B \ln \left (\left (b x +a \right )^{n}\right )-2 B \ln \left (\left (d x +c \right )^{n}\right )-i B \pi \,\operatorname {csgn}\left (i \left (b x +a \right )^{n}\right ) \operatorname {csgn}\left (i \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )+i B \pi \,\operatorname {csgn}\left (i \left (b x +a \right )^{n}\right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}+i B \pi \,\operatorname {csgn}\left (i \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}-i B \pi \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{3}-i B \pi \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )+i B \pi \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}+i B \pi \,\operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}-i B \pi \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{3}\right )}\) \(366\)

[In]

int(1/(b*x+a)/(d*x+c)/(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^2,x,method=_RETURNVERBOSE)

[Out]

1/(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))/B/n/(a*d-b*c)

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 86, normalized size of antiderivative = 2.00 \[ \int \frac {1}{(a+b x) (c+d x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2} \, dx=-\frac {1}{{\left (B^{2} b c - B^{2} a d\right )} n^{2} \log \left (b x + a\right ) - {\left (B^{2} b c - B^{2} a d\right )} n^{2} \log \left (d x + c\right ) + {\left (B^{2} b c - B^{2} a d\right )} n \log \left (e\right ) + {\left (A B b c - A B a d\right )} n} \]

[In]

integrate(1/(b*x+a)/(d*x+c)/(A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^2,x, algorithm="fricas")

[Out]

-1/((B^2*b*c - B^2*a*d)*n^2*log(b*x + a) - (B^2*b*c - B^2*a*d)*n^2*log(d*x + c) + (B^2*b*c - B^2*a*d)*n*log(e)
 + (A*B*b*c - A*B*a*d)*n)

Sympy [F(-1)]

Timed out. \[ \int \frac {1}{(a+b x) (c+d x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2} \, dx=\text {Timed out} \]

[In]

integrate(1/(b*x+a)/(d*x+c)/(A+B*ln(e*(b*x+a)**n/((d*x+c)**n)))**2,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.88 \[ \int \frac {1}{(a+b x) (c+d x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2} \, dx=-\frac {1}{{\left (b c n - a d n\right )} B^{2} \log \left ({\left (b x + a\right )}^{n}\right ) - {\left (b c n - a d n\right )} B^{2} \log \left ({\left (d x + c\right )}^{n}\right ) + {\left (b c n - a d n\right )} A B + {\left (b c n \log \left (e\right ) - a d n \log \left (e\right )\right )} B^{2}} \]

[In]

integrate(1/(b*x+a)/(d*x+c)/(A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^2,x, algorithm="maxima")

[Out]

-1/((b*c*n - a*d*n)*B^2*log((b*x + a)^n) - (b*c*n - a*d*n)*B^2*log((d*x + c)^n) + (b*c*n - a*d*n)*A*B + (b*c*n
*log(e) - a*d*n*log(e))*B^2)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (43) = 86\).

Time = 0.29 (sec) , antiderivative size = 99, normalized size of antiderivative = 2.30 \[ \int \frac {1}{(a+b x) (c+d x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2} \, dx=-\frac {1}{B^{2} b c n^{2} \log \left (b x + a\right ) - B^{2} a d n^{2} \log \left (b x + a\right ) - B^{2} b c n^{2} \log \left (d x + c\right ) + B^{2} a d n^{2} \log \left (d x + c\right ) + B^{2} b c n \log \left (e\right ) - B^{2} a d n \log \left (e\right ) + A B b c n - A B a d n} \]

[In]

integrate(1/(b*x+a)/(d*x+c)/(A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^2,x, algorithm="giac")

[Out]

-1/(B^2*b*c*n^2*log(b*x + a) - B^2*a*d*n^2*log(b*x + a) - B^2*b*c*n^2*log(d*x + c) + B^2*a*d*n^2*log(d*x + c)
+ B^2*b*c*n*log(e) - B^2*a*d*n*log(e) + A*B*b*c*n - A*B*a*d*n)

Mupad [B] (verification not implemented)

Time = 1.25 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.98 \[ \int \frac {1}{(a+b x) (c+d x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2} \, dx=\frac {1}{B\,n\,\left (A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\right )\,\left (a\,d-b\,c\right )} \]

[In]

int(1/((A + B*log((e*(a + b*x)^n)/(c + d*x)^n))^2*(a + b*x)*(c + d*x)),x)

[Out]

1/(B*n*(A + B*log((e*(a + b*x)^n)/(c + d*x)^n))*(a*d - b*c))